﻿#ifndef ACCEPTFRIEND_H
#define ACCEPTFRIEND_H

#include <QPushButton>
#include <QWidget>
#include<string>
#include<unordered_map>
#include"SocketHelper.h"
#include"message.h"
using namespace std;
namespace Ui {
class AcceptFriend;
}

class AcceptFriend : public QWidget
{
    Q_OBJECT

public:
    explicit AcceptFriend(string newFriendName,unordered_map<string,string>* newFriendPtr,bool* isopen,QPushButton* btn,SOCKET sockCli,string sender,QWidget *parent = nullptr);
    ~AcceptFriend();
public:
    string newFriendName;
    string sender;
    unordered_map<string,string>* newFriendPtr;
    bool* isopen;
    QPushButton* btn;
    //与服务器通信的socket
    SOCKET sockCli;
    Message m;
private slots:
    void on_pushButton_clicked();
    void on_pushButton_2_clicked();

private:
    Ui::AcceptFriend *ui;
};

#endif // ACCEPTFRIEND_H
